import request from '@/utils/system/request'

// 获取数据api
export function getData(data: object) {
  return request({
    url: 'get/agent?displayCount=',
    method: 'get',
    // baseURL: '/mock',
    data
  })
}

export function agraee() {
  return request({
    url: 'get/all/agent',
    method: 'get',
    // baseURL: '/mock',
  
  })
}
export function agraeed() {
  return request({
    url: 'get/all/agent',
    method: 'get',
    // baseURL: '/mock',
  
  })
}
export function agraeedpid(data: object) {
	
  return request({
    url: 'get/all/merchant',
    method: 'get',
    // baseURL: '/mock',
  
  })
}


// 获取数据api
export function getDataapi(data: object) {
  return request({
    url: 'get/agent/to/merchant?displayCount=4&currentPage=0&totalPage=0&jumpPage=&agentUid='+data.agentUid+'&merchantUid='+data.merchantUid,
    method: 'get',
    // baseURL: '/mock',
    data
  })
}

// 获取数据api
export function uid() {
  return request({
    url: '/get/zhuzhuang?merchantUid=&agentUid=&supplierUid=&payType=&startTime=&endTime=',
    method: 'get',
    // baseURL: '/mock',
    // data
  })
}

// 获取分类数据
export function getCategory(data: object) {
  return request({
    url: '/table/category',
    method: 'post',
    baseURL: '/mock',
    data
  })
}

// 获取树组织数据
export function getTree(data: object) {
  return request({
    url: '/table/tree',
    method: 'post',
    baseURL: '/mock',
    data
  })
}

// 新增
export function add(data: object) {
  return request({
    url: 'add/agent?agentName='+data.AgentName+'&agentPhone='+data.AgentPhone+'&agentLoginPassword='+data.agentLoginPassword+'&agentVertifyPassword='+data.agentVertifyPassword+'&agentRemark='+data.agentRemark+'&status='+data.status+'',
    method: 'get',
    data
  })
}

// 编辑
export function update(data: object) {
  return request({
    url: 'reset/agent/password?agentUid='+data.AgentUid+'&newPassword='+data.agentLoginPassword+'&newVertifyPassword='+data.agentVertifyPassword+'',
    method: 'get',
    // baseURL: '/mock',
    data
  })
}

// 删除
export function del(data: object) {
  return request({
    url: 'delete/agent?agentUid='+data.merchantUid,
    method: 'post',
    // baseURL: '/mock',
    data
  })
}